﻿@model GameMall_Back.ViewModels.Goods.ViewModelGoods
@{
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@section css{
    @Styles.Render("~/Css/addGoods.css")
    @Styles.Render("~/Css/alert.css")
}
@section scripts{
    @Scripts.Render("~/Js/EditGoods.js")
}
@{
    if (TempData["Error"] != null)
    {
        <script>
                alert("@TempData["Error"]");
        </script>
    }
}
<section class="content-header">
    <h1>
        <a href="/Goods/GoodsList"><img src="~/Images/Shared/return.png" /></a>
        商品列表 - 编辑商品
    </h1>
    <ol class="breadcrumb">
        <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
        <li class="active">Dashboard</li>
    </ol>
</section>
<section class="content">
    <div class="tips">
        <div class="tips-tit">
            <img src="~/Images/Shared/灯.png" />
            <span>操作提示</span>
        </div>
        <ul>
            <li>只有权限管理员才能创建仓库</li>
            <li>标识“*”的选项为必填项，其余为选填项。</li>
            <li>新增仓库后可从仓库列表中找到该条数据，并对其操作。</li>
        </ul>
    </div>
    <div class="steps">
        <div class="img">
            <img src="~/Images/Shared/step-fiest.png" />
        </div>
        <span>填写商品信息</span>
        <span>上传游戏截图</span>
    </div>
    <div class="message">
        <div class="title">游戏基本信息</div>
        <div class="items">
            <div class="word">
                <span class="star">*</span>
                <span>游戏名称:</span>
            </div>
            <input id="GoodsId" name="GoodsId" value="@Model.GoodsId" type="hidden" />
            <input id="GoodsName" name="GoodsName" value="@Model.GoodsName" />
        </div>
        <div class="items">
            <div class="word">
                <span class="star">*</span>
                <span>分类:</span>
            </div>
            @switch (Model.Type)
            {
                case 1:
                    <select id="Type" name="Type">
                        <option value="1" selected="selected">单机游戏</option>
                        <option value="2">网游游戏</option>
                        <option value="3">游戏周边</option>
                    </select>; break;
                case 2:
                    <select id="Type" name="Type">
                        <option value="1">单机游戏</option>
                        <option value="2" selected="selected">网游游戏</option>
                        <option value="3">游戏周边</option>
                    </select>; break;
                case 3:
                    <select id="Type" name="Type">
                        <option value="1">单机游戏</option>
                        <option value="2">网游游戏</option>
                        <option value="3" selected="selected">游戏周边</option>
                    </select>; break;
            }
        </div>
        <div class="items">
            <div class="overflow">
                <div class="word">
                    <span class="star">*</span>
                    <span>游戏版本:</span>
                </div>
            </div>
            <ul>
                @Html.Action("GoodsVersion", "Goods", Model)
                <li class="type">
                    <div>
                        <span class="edit_version">
                            <button id="add_version_bt" data-toggle="modal" data-target="#myModal">添加版本 +</button>
                        </span>
                         
                    </div>
                </li>
            </ul>
            <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
            </div>
        </div>
        <div class="title">游戏介绍</div>
        <textarea id="Detail" class="introduce" name="Detail">
            @Model.Detail
        </textarea>
        <div class="title">其他设置</div>
        <div class="items">
            <div class="word">
                <span>配置要求:</span>
            </div>
            <input id="Configuration" name="Configuration" value="@Model.Configuration" />
        </div>
        <div class="items">
            <div class="word">
                <span>激活方式:</span>
            </div>
            <input id="InstallWay" name="InstallWay" value="@Model.InstallWay" />
        </div>
        <div class="operation">
            <a id="next" class="next-step">下一步，上传商品图片</a>
        </div>
    </div>
</section>
<div id="tip_delete_version">
</div>
@{
    if (TempData["forbid_delete"] != null)
    {
        string message = (string)TempData["forbid_delete"];
        <script>
            alert("@message");
        </script>
    }
}